﻿{layout:default} {class:Shop.Admin.product.StockCaution}
<lbhead>
    <title><%=Tag("库存预警")%>-<%=site.title%></title>
</lbhead>
<lbpath>
    <div class="tools">
    <ul>
    <%if (PageReturnMsg == ""){%>
    <li class="del"><a href="javascript:void(0);" onclick="Delete();"><b></b><span><%=Tag("删除")%></span></a></li>
    <%}%>
    <li class="name"><span id="navIgation"><%=Tag("当前位置")%>：<a href="<%=site.AdminPath %>/Ajax/ajax_admin.aspx?__Action=MenuJump&pid=0"><%=Tag("管理首页")%></a> > <%=Tag("库存预警")%></span></li>
    </ul>
    </div>
</lbpath>
<lbbody>
    <div class="searchbox">
        <input type="text" name="dateFrom" id="dateFrom" size="12" class="input-calendar" value="<%=dateFrom %>" /> - <input type="text" name="dateTo" id="dateTo" size="12" class="input-calendar" value="<%=dateTo %>" /><input type="button" id="btnSou" class="btn-query" onclick="search_();" align="absmiddle" />
    </div>
    <table class="datalist">
        <tr class="title">
            <th style="width: 40px" class="selectAll">
                <a href="javascript:void(0);" onclick="$('input[name=\'id\']').attr('checked',!$(this).attr('checked'));$(this).attr('checked',!$(this).attr('checked'));"><%=Tag("全选")%></a>
            </th>
            <th style="width: 40px">
                <%=Tag("图片")%>
            </th>
            <th>
                <%=Tag("商品名称")%>
            </th>
            <th style="width: 150px">
                <%=Tag("内容")%>
            </th>
            <th style="width: 150px">
                <%=Tag("描述")%>
            </th>
            <th style="width: 130px">
                <%=Tag("时间")%>
            </th>
            <th style="width: 80px">
                <%=Tag("操作")%>
            </th>
        </tr>
        <%foreach (Shop.Model.Lebi_Log model in models)
          {%>
        <tr class="list" ondblclick="View(<%=model.id %>);">
            <td style="text-align:center">
                <input type="checkbox" name="id" value="<%=model.id %>" del="true" />
            </td>
            <td>
                <% if (GetProduct(model.Keyid).ImageSmall == "")
                   { %>
                &nbsp;
                <%}else
                   { %>
                <a href="<%=Image(GetProduct(model.Keyid).ImageOriginal,"big") %>" data-lightbox="image<%=model.id %>"><img style="height: 30px;width: 30px;vertical-align:middle" src="<%=Image(GetProduct(model.Keyid).ImageOriginal,50,50) %>" /></a>
                <%} %>
            </td>
            <td>
                <%=Lang(GetProduct(model.Keyid).Name)%>&nbsp;<a target="_blank" href="<%=Shop.Bussiness.ThemeUrl.GetURL("P_Product",model.Keyid.ToString(),"",CurrentLanguage)%>"><img src="<%=PageImage("icon/newWindow.png")%>" /></a>
            </td>
            <td>
                <%=model.Content%>
            </td>
            <td>
                <%=model.Description%>&nbsp;
            </td>
            <td>
                <%=FormatTime(model.Time_Add) %>
            </td>
            <td>
                <a href="javascript:void(0)" onclick="View(<%=model.id %>);"><%=Tag("查看")%></a>     
            </td>
        </tr>
        <%} %>
    </table>
    <script type="text/javascript">
        function search_() {
            var dateFrom = $("#dateFrom").val();
            var dateTo = $("#dateTo").val();
            window.location = "?dateFrom=" + dateFrom + "&dateTo=" + dateTo ;
        }
        function View(id) {
            var title_ = "<%=Tag("日志详情")%>";
            var url_ = "<%=site.AdminPath %>/admin/log_edit_window.aspx?id=" + id;
            var width_ = 600;
            var height_ = "auto";
            var modal_ = true;
            EditWindow(title_, url_, width_, height_, modal_);
        }
        function Delete() {
            if (!confirm("<%=Tag("确认要删除吗？")%>"))
                return false;
            var postData = GetFormJsonData("del");
            var url = "<%=site.AdminPath %>/ajax/ajax_admin.aspx?__Action=Log_Del";
            RequestAjax(url,postData,function(){MsgBox(1, "<%=Tag("操作成功")%>", "?")});
        }
    </script>
</lbbody>
<lbbottom>
<div class="bottom" id="body_bottom">
    <%=PageString%>
</div>
</lbbottom>
